<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>tdl</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-tdl/">python-tdl</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;tdl
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="tdl-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package tdl</h1><p class="nomargin-top"><span class="codelink"><a href="tdl-pysrc.html">source&nbsp;code</a></span></p>
<p>The documentation for python-tdl.  A Pythonic port of <a 
  href="http://doryen.eptalys.net/libtcod/" target="_top">libtcod</a>.</p>
  <p>You can find the project page on Google Code <a 
  href="http://code.google.com/p/python-tdl/" target="_top">here</a>.</p>
  <h1 class="heading">Getting Started</h1>
    <p>Once the library is imported you can load the font you want to use 
    with <a href="tdl-module.html#setFont" class="link">tdl.setFont</a>. 
    This is optional and when skipped will use a decent default font.</p>
    <p>After that you call <a href="tdl-module.html#init" 
    class="link">tdl.init</a> to set the size of the window and get the 
    root console in return. This console is the canvas to what will appear 
    on the screen.</p>
  <h1 class="heading">Indexing Consoles</h1>
    <p>For most methods taking a position you can use Python-style negative
    indexes to refer to the opposite side of a console with (-1, -1) 
    starting at the bottom right. You can also check if a point is part of 
    a console using containment logic i.e. ((x, y) in console).</p>
  <h1 class="heading">Drawing</h1>
    <p>Once you have the root console from <a href="tdl-module.html#init" 
    class="link">tdl.init</a> you can start drawing on it using a method 
    such as <a href="tdl._MetaConsole-class.html#drawChar" 
    class="link">Console.drawChar</a>. When using this method you can have 
    the char parameter be an integer or a single character string. The 
    fgcolor and bgcolor parameters expect a three item list [red, green, 
    blue] with integers in the 0-255 range with [0, 0, 0] being black and 
    [255, 255, 255] being white. Or instead you can use None for any of the
    three parameters to tell the library to keep what is at that spot 
    instead of overwriting it. After the drawing functions are called a 
    call to <a href="tdl-module.html#flush" class="link">tdl.flush</a> will
    update the screen.</p>

<!-- ==================== SUBMODULES ==================== -->
<a name="section-Submodules"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Submodules</span></td>
</tr>
  <tr><td class="summary">
  <ul class="nomargin">
    <li> <strong class="uidlink"><a href="tdl.event-module.html">tdl.event</a></strong>: <em class="summary">This module handles user input.</em>    </li>
    <li> <strong class="uidlink"><a href="tdl.map-module.html">tdl.map</a></strong>: <em class="summary">Rogue-like map utilitys such as line-of-sight, field-of-view, and 
        path-finding.</em>    </li>
    <li> <strong class="uidlink"><a href="tdl.noise-module.html">tdl.noise</a></strong>: <em class="summary">This module provides advanced noise generation.</em>    </li>
  </ul></td></tr>
</table>

<br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Classes</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="tdl.Console-class.html" class="summary-name">Console</a><br />
      Contains character and color data and can be drawn to.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="tdl.TDLError-class.html" class="summary-name">TDLError</a><br />
      The catch all for most TDL specific errors.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="tdl.Typewriter-class.html" class="summary-name">Typewriter</a><br />
      Converts a console into a scrolling text log that respects special 
        characters.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="tdl.Window-class.html" class="summary-name">Window</a><br />
      A Window contains a small isolated part of a Console.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="tdl._MetaConsole-class.html" class="summary-name">_MetaConsole</a><br />
      Contains methods shared by both the <a 
        href="tdl.Console-class.html" class="link">Console</a> and <a 
        href="tdl.Window-class.html" class="link">Window</a> classes.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Functions</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl-module.html#flush" class="summary-sig-name">flush</a>()</span><br />
      Make all changes visible and update the screen.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#flush">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl-module.html#forceResolution" class="summary-sig-name">forceResolution</a>(<span class="summary-sig-arg">width</span>,
        <span class="summary-sig-arg">height</span>)</span><br />
      Change the fullscreen resoulution</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#forceResolution">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl-module.html#getFPS" class="summary-sig-name">getFPS</a>()</span><br />
      Return the current frames per second of the running program set by <a
      href="tdl-module.html#setFPS" class="link">setFPS</a></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#getFPS">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">boolean</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl-module.html#getFullscreen" class="summary-sig-name">getFullscreen</a>()</span><br />
      Returns True if program is fullscreen.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#getFullscreen">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><a href="tdl.Console-class.html" class="link">Console</a></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl-module.html#init" class="summary-sig-name">init</a>(<span class="summary-sig-arg">width</span>,
        <span class="summary-sig-arg">height</span>,
        <span class="summary-sig-arg">title</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">fullscreen</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">renderer</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">OPENGL</code><code class="variable-quote">'</code></span>)</span><br />
      Start the main console with the given width and height and return the
      root console.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#init">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl-module.html#screenshot" class="summary-sig-name">screenshot</a>(<span class="summary-sig-arg">path</span>=<span class="summary-sig-default">None</span>)</span><br />
      Capture the screen and save it as a png file</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#screenshot">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl-module.html#setFPS" class="summary-sig-name">setFPS</a>(<span class="summary-sig-arg">frameRate</span>)</span><br />
      Set the maximum frame rate.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#setFPS">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl-module.html#setFont" class="summary-sig-name">setFont</a>(<span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">columns</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">rows</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">columnFirst</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">greyscale</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">altLayout</span>=<span class="summary-sig-default">False</span>)</span><br />
      Changes the font to be used for this session.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#setFont">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl-module.html#setFullscreen" class="summary-sig-name">setFullscreen</a>(<span class="summary-sig-arg">fullscreen</span>)</span><br />
      Changes the fullscreen state.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#setFullscreen">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl-module.html#setTitle" class="summary-sig-name">setTitle</a>(<span class="summary-sig-arg">title</span>)</span><br />
      Change the window title.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#setTitle">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Function Details</span></td>
</tr>
</table>
<a name="flush"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">flush</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#flush">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Make all changes visible and update the screen.</p>
  <p>Remember to call this function after drawing operations. Calls to 
  flush will enfore the frame rate limit set by <a 
  href="tdl-module.html#setFPS" class="link">tdl.setFPS</a>.</p>
  <p>This function can only be called after <a href="tdl-module.html#init" 
  class="link">tdl.init</a></p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="forceResolution"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">forceResolution</span>(<span class="sig-arg">width</span>,
        <span class="sig-arg">height</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#forceResolution">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Change the fullscreen resoulution</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>width</code></strong> (int)</li>
        <li><strong class="pname"><code>height</code></strong> (int)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="getFPS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getFPS</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#getFPS">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return the current frames per second of the running program set by <a 
  href="tdl-module.html#setFPS" class="link">setFPS</a></p>
  <dl class="fields">
    <dt>Returns: int</dt>
        <dd>Returns the frameRate set by setFPS. If set to no limit, this 
          will return 0.</dd>
  </dl>
</td></tr></table>
</div>
<a name="getFullscreen"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getFullscreen</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#getFullscreen">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns True if program is fullscreen.</p>
  <dl class="fields">
    <dt>Returns: boolean</dt>
        <dd>Returns True if the window is in fullscreen mode. Otherwise 
          returns False.</dd>
  </dl>
</td></tr></table>
</div>
<a name="init"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">init</span>(<span class="sig-arg">width</span>,
        <span class="sig-arg">height</span>,
        <span class="sig-arg">title</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">fullscreen</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">renderer</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">OPENGL</code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#init">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Start the main console with the given width and height and return the 
  root console.</p>
  <p>Call the consoles drawing functions.  Then remember to use <a 
  href="tdl-module.html#flush" class="link">tdl.flush</a> to make what's 
  drawn visible on the console.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>width</code></strong> (int) - width of the root console (in tiles)</li>
        <li><strong class="pname"><code>height</code></strong> (int) - height of the root console (in tiles)</li>
        <li><strong class="pname"><code>title</code></strong> (string) - Text to display as the window title.
          <p>If left None it defaults to the running scripts filename.</p></li>
        <li><strong class="pname"><code>fullscreen</code></strong> (boolean) - Can be set to True to start in fullscreen mode.</li>
        <li><strong class="pname"><code>renderer</code></strong> (string) - Can be one of 'GLSL', 'OPENGL', or 'SDL'.
          <p>Due to way Python works you're unlikely to see much of an 
          improvement by using 'GLSL' or 'OPENGL' as most of the time 
          Python is slow interacting with the console and the rendering 
          itself is pretty fast even on 'SDL'.</p></li>
    </ul></dd>
    <dt>Returns: <a href="tdl.Console-class.html" class="link">Console</a></dt>
        <dd>The root console.  Only what is drawn on the root console is 
          what's visible after a call to <a href="tdl-module.html#flush" 
          class="link">tdl.flush</a>. After the root console is garbage 
          collected, the window made by this function will close.</dd>
  </dl>
</td></tr></table>
</div>
<a name="screenshot"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">screenshot</span>(<span class="sig-arg">path</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#screenshot">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Capture the screen and save it as a png file</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>path</code></strong> (string) - The filepath to save the screenshot.
          <p>If path is None then the image will be placed in the current 
          folder with the names: screenshot001.png, screenshot002.png, 
          ...</p></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="setFPS"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setFPS</span>(<span class="sig-arg">frameRate</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#setFPS">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Set the maximum frame rate.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>frameRate</code></strong> (int) - Further calls to <a href="tdl-module.html#flush" 
          class="link">tdl.flush</a> will limit the speed of the program to
          run at &lt;frameRate&gt; frames per second. Can also be set to 0 
          to run without a limit.
          <p>Defaults to None.</p></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="setFont"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setFont</span>(<span class="sig-arg">path</span>,
        <span class="sig-arg">columns</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">rows</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">columnFirst</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">greyscale</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">altLayout</span>=<span class="sig-default">False</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#setFont">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Changes the font to be used for this session. This should be called 
  before <a href="tdl-module.html#init" class="link">tdl.init</a></p>
  <p>If the font specifies its size in its filename (i.e. font_NxN.png) 
  then this function can auto-detect the tileset formatting and the 
  parameters columns and rows can be left None.</p>
  <p>While it's possible you can change the font mid program it can 
  sometimes break in rare circumstances.  So use caution when doing 
  this.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>path</code></strong> (string) - Must be a string filepath where a bmp or png file is found.</li>
        <li><strong class="pname"><code>columns</code></strong> (int) - Number of columns in the tileset.
          <p>Can be left None for auto-detection.</p></li>
        <li><strong class="pname"><code>rows</code></strong> (int) - Number of rows in the tileset.
          <p>Can be left None for auto-detection.</p></li>
        <li><strong class="pname"><code>columnFirst</code></strong> (boolean) - Defines if the characer order goes along the rows or colomns. It 
          should be True if the charater codes 0-15 are in the first 
          column. And should be False if the characters 0-15 are in the 
          first row.</li>
        <li><strong class="pname"><code>greyscale</code></strong> (boolean) - Creates an anti-aliased font from a greyscale bitmap. Otherwise 
          it uses the alpha channel for anti-aliasing.
          <p>Unless you actually need anti-aliasing from a font you know 
          uses a smooth greyscale channel you should leave this on 
          False.</p></li>
        <li><strong class="pname"><code>altLayout</code></strong> (boolean) - An alternative layout with space in the upper left corner. The 
          colomn parameter is ignored if this is True, find examples of 
          this layout in the font/libtcod/ directory included with the 
          python-tdl source.</li>
    </ul></dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'><a href="tdl.TDLError-class.html">TDLError</a></strong></code> - Will be raised if no file is found at path or if auto- detection 
        fails.</li>
    </ul></dd>
  </dl>
<div class="fields">      <p><strong>Note:</strong>
        A png file that's been optimized can fail to load correctly on MAC 
        OS X creating a garbled mess when rendering. Don't use a program 
        like optipng or just use bmp files instead if you want your program
        to work on macs.
      </p>
</div></td></tr></table>
</div>
<a name="setFullscreen"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setFullscreen</span>(<span class="sig-arg">fullscreen</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#setFullscreen">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Changes the fullscreen state.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>fullscreen</code></strong> (boolean)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="setTitle"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setTitle</span>(<span class="sig-arg">title</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#setTitle">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Change the window title.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>title</code></strong> (string)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-tdl/">python-tdl</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0.1 on Mon Dec 17 00:44:50 2012</a>
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
